[C#] Boot problem

Posted by Cecco on Stack Overflow See other posts from Stack Overflow or by Cecco
Published on 2011-01-02T11:47:07Z Indexed on 2011/01/02 11:53 UTC
Read the original article Hit count: 177

Filed under:
|
|
|
|

Hi guys, I'm running on Windows 7 and I've a problem with my app at boot. Within my app I use some threads and external dll (sqlite3.dll, etc...). I've included these lines at first of my start.exe file:

RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
String p = System.Environment.CommandLine.Replace("vshost.","");
String pp = p.Remove(p.Length-1);
rkApp.SetValue("MyAPP", pp);

If I start my app manually from exe file (or with VisualStudio) works correctly. If I start my app on reboot, MyApp crashes after few seconds.

Why I've this problem?

© Stack Overflow or respective owner

Related posts about c#

Related posts about windows-7